package com.hzhr.iot.device.convertor;

import com.hzhr.iot.device.convertor.custom.*;
import com.hzhr.iot.core.util.HzhrTypeUtil;
import com.hzhr.iot.core.util.HzhrJsonUtil;
import java.util.Map;
import com.hzhr.iot.device.model.implRecord.ImplRecordModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordPostModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordPutModel;
import com.hzhr.iot.device.entity.ImplRecordEntity;
import com.hzhr.iot.device.entity.ext.ImplRecordEntityExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.hzhr.iot.device.model.implRecord.ImplRecordModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordGetModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordPostModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordPutModel;
import com.hzhr.iot.device.queryModel.custom.ImplRecordCustomQueryModel;

@Component
public class ImplRecordConvertor {
    @Autowired
    AlarmDataCustomConvertor alarmDataCustomConvertor;
    @Autowired
    CollectDataCustomConvertor collectDataCustomConvertor;
    @Autowired
    CollectDeviceCustomConvertor collectDeviceCustomConvertor;
    @Autowired
    CollectDeviceTypeCustomConvertor collectDeviceTypeCustomConvertor;
    @Autowired
    DeviceInfoCardCustomConvertor deviceInfoCardCustomConvertor;
    @Autowired
    DeviceMaintenanceCardCustomConvertor deviceMaintenanceCardCustomConvertor;
    @Autowired
    DeviceMaintenanceCardItemCustomConvertor deviceMaintenanceCardItemCustomConvertor;
    @Autowired
    ImplFactoryCustomConvertor implFactoryCustomConvertor;
    @Autowired
    ImplIotDeviceTypeCustomConvertor implIotDeviceTypeCustomConvertor;
    @Autowired
    IotDeviceCustomConvertor iotDeviceCustomConvertor;
    @Autowired
    IotDeviceTypeCustomConvertor iotDeviceTypeCustomConvertor;
    @Autowired
    OptionsCustomConvertor optionsCustomConvertor;
    @Autowired
    ProdFactoryCustomConvertor prodFactoryCustomConvertor;
    @Autowired
    RegulatorCollectDataCustomConvertor regulatorCollectDataCustomConvertor;
    @Autowired
    UserCompanyCustomConvertor userCompanyCustomConvertor;

    public ImplRecordEntity implRecordModel2entity(ImplRecordModel in) {
        //未转换字段: createUserId createTime updateUserId isValid updateTime state 
        if (in == null) return null;
        ImplRecordEntity result = new ImplRecordEntity();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.long2date(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.long2date(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.long2date(in.getCheckTime()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        return result;
    }
    public ImplRecordEntity implRecordModel2entity(ImplRecordModel in, ImplRecordEntity ori) {
        //未转换字段: createUserId createTime updateUserId isValid updateTime state 
        if (in == null) return null;
        ImplRecordEntity result = ori;

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.long2date(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.long2date(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.long2date(in.getCheckTime()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        return result;
    }
    public List<ImplRecordEntity> implRecordModelList2entityList(List<ImplRecordModel> in) {
        if (in == null) return null;
        List<ImplRecordEntity> result = new ArrayList<>();
        for (ImplRecordModel item : in) {
            result.add(implRecordModel2entity(item));
        }
        return result;
    }
    public ImplRecordModel entity2implRecordModel(ImplRecordEntity in) {
        //未转换字段: iotDeviceTypeDes fixStatusDes runStatusDes simTypeDes prodFactoryDes commStatusDes iotDeviceDes iotDeviceCategoryCode managedMeterInfoDes iotDeviceSimTypeCode collectDeviceDes installFacotoryDes iotDeviceSimTypeDes collectDeviceCategoryCode iotDeviceSimNo 
        if (in == null) return null;
        ImplRecordModel result = new ImplRecordModel();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.date2long(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.date2long(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.date2long(in.getCheckTime()));
        return result;
    }
    public List<ImplRecordModel> entityList2implRecordModelList(List<ImplRecordEntity> in) {
        if (in == null) return null;
        List<ImplRecordModel> result = new ArrayList<>();
        for (ImplRecordEntity item : in) {
            result.add(entity2implRecordModel(item));
        }
        return result;
    }
    public ImplRecordModel ext2implRecordModel(ImplRecordEntityExt in) {
        //未转换字段: iotDeviceTypeDes fixStatusDes runStatusDes simTypeDes prodFactoryDes commStatusDes iotDeviceDes iotDeviceCategoryCode managedMeterInfoDes iotDeviceSimTypeCode collectDeviceDes installFacotoryDes iotDeviceSimTypeDes collectDeviceCategoryCode iotDeviceSimNo 
        if (in == null) return null;
        ImplRecordModel result = new ImplRecordModel();

        result.setId(HzhrTypeUtil.integer2integer(in.getId()));
        result.setCode(HzhrTypeUtil.string2string(in.getCode()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.date2long(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.date2long(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.date2long(in.getCheckTime()));
        return result;
    }
    public List<ImplRecordModel> extList2implRecordModelList(List<ImplRecordEntityExt> in) {
        if (in == null) return null;
        List<ImplRecordModel> result = new ArrayList<>();
        for (ImplRecordEntityExt item : in) {
            result.add(ext2implRecordModel(item));
        }
        return result;
    }
    public ImplRecordGetModel extList2implRecordGetModel(List<ImplRecordEntityExt> extList, Integer total, Integer changeCount, Map<String, Object> query) {
        List<ImplRecordModel> modelList = extList2implRecordModelList(extList);
        if (modelList == null) {
            ImplRecordGetModel result = new ImplRecordGetModel();
            result.setTotal(total);
            result.setChangeCount(changeCount);
            return result;
        }

         String _show = HzhrTypeUtil.object2string(query.get("_show"));
         Boolean _show_iotDevice = query.get("_show_iotDevice") != null ? Boolean.parseBoolean(query.get("_show_iotDevice").toString()) : false;
         Boolean _show_info = query.get("_show_info") != null ? Boolean.parseBoolean(query.get("_show_info").toString()) : false;
         Boolean _show_collectDevice = query.get("_show_collectDevice") != null ? Boolean.parseBoolean(query.get("_show_collectDevice").toString()) : false;

        if (!_show_iotDevice) {
            for (ImplRecordModel model : modelList) {
                model.setIotDeviceDes(null);
                model.setIotDeviceCategoryCode(null);
                model.setIotDeviceSimNo(null);
                model.setIotDeviceSimTypeCode(null);
                model.setIotDeviceSimTypeDes(null);
            }
        }
        if (!_show_info) {
            for (ImplRecordModel model : modelList) {
                model.setCollectDeviceId(null);
                model.setCollectDeviceCode(null);
                model.setCollectDeviceTypeId(null);
                model.setIotDeviceId(null);
                model.setIotDeviceCode(null);
                model.setIotDeviceTypeId(null);
                model.setIotDeviceTypeDes(null);
                model.setGasUserCode(null);
                model.setSimNo(null);
                model.setSimTypeCode(null);
                model.setSimTypeDes(null);
                model.setInstallTime(null);
                model.setInstallAddress(null);
                model.setBeforeImg(null);
                model.setAfterImg(null);
                model.setSceneImg(null);
                model.setBeforeReading(null);
                model.setAfterReading(null);
                model.setAfterCellVoltage(null);
                model.setLongitude(null);
                model.setLatitude(null);
                model.setCommStatusCode(null);
                model.setCommStatusDes(null);
                model.setRunStatusCode(null);
                model.setRunStatusDes(null);
                model.setFixStatusCode(null);
                model.setFixStatusDes(null);
                model.setImplementer(null);
                model.setChecker(null);
                model.setImplementTime(null);
                model.setCheckTime(null);
                model.setCompanyId(null);
                model.setDeptId(null);
                model.setSubCompanyId(null);
                model.setInstallFacotoryId(null);
                model.setInstallFacotoryDes(null);
                model.setManagedMeterCount(null);
                model.setManagedMeterInfo(null);
                model.setManagedMeterInfoDes(null);
                model.setMeterType(null);
                model.setProdFactoryId(null);
                model.setProdFactoryDes(null);
                model.setGasUserName(null);
                model.setGasUserAddress(null);
            }
        }
        if (!_show_collectDevice) {
            for (ImplRecordModel model : modelList) {
                model.setCollectDeviceDes(null);
                model.setCollectDeviceCategoryCode(null);
            }
        }

        ImplRecordGetModel result = new ImplRecordGetModel();
        if ("one".equals(_show)) {
            if (modelList.size() > 0) {
                result.setModel(modelList.get(0));
            }
         }
        if ("list".equals(_show)) {
            result.setModelList(modelList);
        }
        result.setTotal(total);
        result.setChangeCount(changeCount);
        return result;
    }
    public ImplRecordGetModel entity2implRecordGetModel(ImplRecordEntity entity, Integer total, Integer changeCount, Map<String, Object> query) {
        List<ImplRecordEntityExt> extList = new ArrayList<>();
        if (entity == null) return extList2implRecordGetModel(extList, total, changeCount, query);
        extList.add(HzhrJsonUtil.convertObjectType(entity, ImplRecordEntityExt.class));
        return extList2implRecordGetModel(extList, total, changeCount, query);
     }
    public ImplRecordEntity implRecordPostModel2entity(ImplRecordPostModel in) {
        //未转换字段: createUserId code createTime updateUserId isValid updateTime id state 
        if (in == null) return null;
        ImplRecordEntity result = new ImplRecordEntity();

        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.long2date(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.long2date(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.long2date(in.getCheckTime()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        return result;
    }
    public ImplRecordEntity implRecordPostModel2entity(ImplRecordPostModel in, ImplRecordEntity ori) {
        //未转换字段: createUserId code createTime updateUserId isValid updateTime id state 
        if (in == null) return null;
        ImplRecordEntity result = ori;

        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.long2date(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.long2date(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.long2date(in.getCheckTime()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        return result;
    }
    public List<ImplRecordEntity> implRecordPostModelList2entityList(List<ImplRecordPostModel> in) {
        if (in == null) return null;
        List<ImplRecordEntity> result = new ArrayList<>();
        for (ImplRecordPostModel item : in) {
            result.add(implRecordPostModel2entity(item));
        }
        return result;
    }
    public ImplRecordPostModel entity2implRecordPostModel(ImplRecordEntity in) {
        //未转换字段: commStatusDes fixStatusDes runStatusDes 
        if (in == null) return null;
        ImplRecordPostModel result = new ImplRecordPostModel();

        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.date2long(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.date2long(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.date2long(in.getCheckTime()));
        return result;
    }
    public List<ImplRecordPostModel> entityList2implRecordPostModelList(List<ImplRecordEntity> in) {
        if (in == null) return null;
        List<ImplRecordPostModel> result = new ArrayList<>();
        for (ImplRecordEntity item : in) {
            result.add(entity2implRecordPostModel(item));
        }
        return result;
    }
    public ImplRecordPostModel ext2implRecordPostModel(ImplRecordEntityExt in) {
        //未转换字段: commStatusDes fixStatusDes runStatusDes 
        if (in == null) return null;
        ImplRecordPostModel result = new ImplRecordPostModel();

        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.date2long(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.date2long(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.date2long(in.getCheckTime()));
        return result;
    }
    public List<ImplRecordPostModel> extList2implRecordPostModelList(List<ImplRecordEntityExt> in) {
        if (in == null) return null;
        List<ImplRecordPostModel> result = new ArrayList<>();
        for (ImplRecordEntityExt item : in) {
            result.add(ext2implRecordPostModel(item));
        }
        return result;
    }
    public ImplRecordEntity implRecordPutModel2entity(ImplRecordPutModel in) {
        //未转换字段: createUserId code createTime updateUserId isValid updateTime id state 
        if (in == null) return null;
        ImplRecordEntity result = new ImplRecordEntity();

        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.long2date(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.long2date(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.long2date(in.getCheckTime()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        return result;
    }
    public ImplRecordEntity implRecordPutModel2entity(ImplRecordPutModel in, ImplRecordEntity ori) {
        //未转换字段: createUserId code createTime updateUserId isValid updateTime id state 
        if (in == null) return null;
        ImplRecordEntity result = ori;

        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.long2date(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.long2date(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.long2date(in.getCheckTime()));
        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        return result;
    }
    public List<ImplRecordEntity> implRecordPutModelList2entityList(List<ImplRecordPutModel> in) {
        if (in == null) return null;
        List<ImplRecordEntity> result = new ArrayList<>();
        for (ImplRecordPutModel item : in) {
            result.add(implRecordPutModel2entity(item));
        }
        return result;
    }
    public ImplRecordPutModel entity2implRecordPutModel(ImplRecordEntity in) {
        //未转换字段: commStatusDes code fixStatusDes runStatusDes 
        if (in == null) return null;
        ImplRecordPutModel result = new ImplRecordPutModel();

        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.date2long(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.date2long(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.date2long(in.getCheckTime()));
        return result;
    }
    public List<ImplRecordPutModel> entityList2implRecordPutModelList(List<ImplRecordEntity> in) {
        if (in == null) return null;
        List<ImplRecordPutModel> result = new ArrayList<>();
        for (ImplRecordEntity item : in) {
            result.add(entity2implRecordPutModel(item));
        }
        return result;
    }
    public ImplRecordPutModel ext2implRecordPutModel(ImplRecordEntityExt in) {
        //未转换字段: commStatusDes code fixStatusDes runStatusDes 
        if (in == null) return null;
        ImplRecordPutModel result = new ImplRecordPutModel();

        result.setCompanyId(HzhrTypeUtil.integer2integer(in.getCompanyId()));
        result.setSubCompanyId(HzhrTypeUtil.integer2integer(in.getSubCompanyId()));
        result.setDeptId(HzhrTypeUtil.integer2integer(in.getDeptId()));
        result.setIotDeviceId(HzhrTypeUtil.integer2integer(in.getIotDeviceId()));
        result.setIotDeviceCode(HzhrTypeUtil.string2string(in.getIotDeviceCode()));
        result.setIotDeviceTypeId(HzhrTypeUtil.integer2integer(in.getIotDeviceTypeId()));
        result.setProdFactoryId(HzhrTypeUtil.integer2integer(in.getProdFactoryId()));
        result.setCollectDeviceId(HzhrTypeUtil.integer2integer(in.getCollectDeviceId()));
        result.setCollectDeviceCode(HzhrTypeUtil.string2string(in.getCollectDeviceCode()));
        result.setCollectDeviceTypeId(HzhrTypeUtil.integer2integer(in.getCollectDeviceTypeId()));
        result.setMeterType(HzhrTypeUtil.string2string(in.getMeterType()));
        result.setGasUserCode(HzhrTypeUtil.string2string(in.getGasUserCode()));
        result.setGasUserName(HzhrTypeUtil.string2string(in.getGasUserName()));
        result.setGasUserAddress(HzhrTypeUtil.string2string(in.getGasUserAddress()));
        result.setSimNo(HzhrTypeUtil.string2string(in.getSimNo()));
        result.setSimTypeCode(HzhrTypeUtil.string2string(in.getSimTypeCode()));
        result.setInstallTime(HzhrTypeUtil.date2long(in.getInstallTime()));
        result.setInstallAddress(HzhrTypeUtil.string2string(in.getInstallAddress()));
        result.setInstallFacotoryId(HzhrTypeUtil.integer2integer(in.getInstallFacotoryId()));
        result.setBeforeImg(HzhrTypeUtil.string2string(in.getBeforeImg()));
        result.setAfterImg(HzhrTypeUtil.string2string(in.getAfterImg()));
        result.setSceneImg(HzhrTypeUtil.string2string(in.getSceneImg()));
        result.setBeforeReading(HzhrTypeUtil.double2double(in.getBeforeReading()));
        result.setAfterReading(HzhrTypeUtil.double2double(in.getAfterReading()));
        result.setAfterCellVoltage(HzhrTypeUtil.float2float(in.getAfterCellVoltage()));
        result.setLongitude(HzhrTypeUtil.double2double(in.getLongitude()));
        result.setLatitude(HzhrTypeUtil.double2double(in.getLatitude()));
        result.setManagedMeterCount(HzhrTypeUtil.integer2integer(in.getManagedMeterCount()));
        result.setManagedMeterInfo(HzhrTypeUtil.string2string(in.getManagedMeterInfo()));
        result.setCommStatusCode(HzhrTypeUtil.string2string(in.getCommStatusCode()));
        result.setRunStatusCode(HzhrTypeUtil.string2string(in.getRunStatusCode()));
        result.setFixStatusCode(HzhrTypeUtil.string2string(in.getFixStatusCode()));
        result.setImplementer(HzhrTypeUtil.string2string(in.getImplementer()));
        result.setChecker(HzhrTypeUtil.string2string(in.getChecker()));
        result.setImplementTime(HzhrTypeUtil.date2long(in.getImplementTime()));
        result.setCheckTime(HzhrTypeUtil.date2long(in.getCheckTime()));
        return result;
    }
    public List<ImplRecordPutModel> extList2implRecordPutModelList(List<ImplRecordEntityExt> in) {
        if (in == null) return null;
        List<ImplRecordPutModel> result = new ArrayList<>();
        for (ImplRecordEntityExt item : in) {
            result.add(ext2implRecordPutModel(item));
        }
        return result;
    }
    public ImplRecordCustomQueryModel collectDevice_ImplRecordService_query2queryModel(Map<String, Object> query) {
        ImplRecordCustomQueryModel queryModel = new ImplRecordCustomQueryModel();


        Integer page = HzhrTypeUtil.object2integer(query.get("_page"));
        Integer count = HzhrTypeUtil.object2integer(query.get("_count"));
        queryModel.setPage(page, count);

        return queryModel;
    }
    public ImplRecordCustomQueryModel implRecordService_query2queryModel(Map<String, Object> query) {
        ImplRecordCustomQueryModel queryModel = new ImplRecordCustomQueryModel();

        Integer _equal_id = HzhrTypeUtil.object2integer(query.get("_equal_id"));
        if (_equal_id != null) {
            queryModel.setEqual_id(_equal_id);
         }

        String _equal_gasUserCode = HzhrTypeUtil.object2string(query.get("_equal_gasUserCode"));
        if (_equal_gasUserCode != null) {
            queryModel.setEqual_gasUserCode(_equal_gasUserCode);
         }

        Integer _equal_deptId = HzhrTypeUtil.object2integer(query.get("_equal_deptId"));
        if (_equal_deptId != null) {
            queryModel.setEqual_deptId(_equal_deptId);
         }

        Integer _equal_createUserId = HzhrTypeUtil.object2integer(query.get("_equal_createUserId"));
        if (_equal_createUserId != null) {
            queryModel.setEqual_createUserId(_equal_createUserId);
         }

        String _equal_iotDeviceCode = HzhrTypeUtil.object2string(query.get("_equal_iotDeviceCode"));
        if (_equal_iotDeviceCode != null) {
            queryModel.setEqual_iotDeviceCode(_equal_iotDeviceCode);
         }

        Integer _equal_subCompanyId = HzhrTypeUtil.object2integer(query.get("_equal_subCompanyId"));
        if (_equal_subCompanyId != null) {
            queryModel.setEqual_subCompanyId(_equal_subCompanyId);
         }

        String _equal_collectDeviceCode = HzhrTypeUtil.object2string(query.get("_equal_collectDeviceCode"));
        if (_equal_collectDeviceCode != null) {
            queryModel.setEqual_collectDeviceCode(_equal_collectDeviceCode);
         }

        String _equal_code = HzhrTypeUtil.object2string(query.get("_equal_code"));
        if (_equal_code != null) {
            queryModel.setEqual_code(_equal_code);
         }

        String _like_gasUserName = HzhrTypeUtil.object2string(query.get("_like_gasUserName"));
        if (_like_gasUserName != null) {
            queryModel.setLike_gasUserName(_like_gasUserName);
         }

        String _like_gasUserAddress = HzhrTypeUtil.object2string(query.get("_like_gasUserAddress"));
        if (_like_gasUserAddress != null) {
            queryModel.setLike_gasUserAddress(_like_gasUserAddress);
         }

        String _orderBy_implementTime = HzhrTypeUtil.object2string(query.get("_orderBy_implementTime"));
        if (_orderBy_implementTime != null) {
            queryModel.setOrderBy_implementTime(_orderBy_implementTime);
         }

        Date _greaterthanorequal_implementTime = HzhrTypeUtil.object2date(query.get("_greaterthanorequal_implementTime"));
        if (_greaterthanorequal_implementTime != null) {
            queryModel.setGreaterthanorequal_implementTime(_greaterthanorequal_implementTime);
         }

        Date _lessthanorequal_implementTime = HzhrTypeUtil.object2date(query.get("_lessthanorequal_implementTime"));
        if (_lessthanorequal_implementTime != null) {
            queryModel.setLessthanorequal_implementTime(_lessthanorequal_implementTime);
         }

        List _in_code = HzhrTypeUtil.object2list(query.get("_in_code"));
        if (_in_code != null) {
            queryModel.setIn_code(_in_code);
         }

        Boolean _show_iotDevice = HzhrTypeUtil.object2boolean(query.get("_show_iotDevice"));
        if (_show_iotDevice != null && _show_iotDevice) {
            queryModel.setExt_iotDeviceExt(true);
            queryModel.setShow6(true);
            queryModel.setExt_iotDeviceExt(true);
            queryModel.setShow6(true);
            queryModel.setExt_iotDeviceExt(true);
            queryModel.setShow6(true);
            queryModel.setExt_iotDeviceExt(true);
            queryModel.setShow6(true);
            queryModel.setExt_iotDeviceExt_simTypeExt(true);
            queryModel.setShow8(true);
        }
        queryModel.setShow(true);
        Boolean _show_info = HzhrTypeUtil.object2boolean(query.get("_show_info"));
        if (_show_info != null && _show_info) {
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_iotDeviceTypeExt(true);
            queryModel.setShow26(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_simTypeExt(true);
            queryModel.setShow28(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_commStatusExt(true);
            queryModel.setShow2(true);
            queryModel.setShow(true);
            queryModel.setExt_runStatusExt(true);
            queryModel.setShow3(true);
            queryModel.setShow(true);
            queryModel.setExt_fixStatusExt(true);
            queryModel.setShow4(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_installFacotoryExt(true);
            queryModel.setShow30(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_managedMeterInfoExt(true);
            queryModel.setShow29(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
            queryModel.setExt_prodFactoryExt(true);
            queryModel.setShow27(true);
            queryModel.setShow(true);
            queryModel.setShow(true);
        }
        Boolean _show_collectDevice = HzhrTypeUtil.object2boolean(query.get("_show_collectDevice"));
        if (_show_collectDevice != null && _show_collectDevice) {
            queryModel.setExt_collectDeviceExt(true);
            queryModel.setShow5(true);
            queryModel.setExt_collectDeviceExt(true);
            queryModel.setShow5(true);
        }

        Integer page = HzhrTypeUtil.object2integer(query.get("_page"));
        Integer count = HzhrTypeUtil.object2integer(query.get("_count"));
        queryModel.setPage(page, count);

        return queryModel;
    }

}

